<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		var stu = {
			name : "张三",
			age : 18,
			study : function() {
				console.log("学习");
			}
		}

		stu.study();
	</script>

	<script>
		var stu = new Object(); // 创建一个对象
		// 为对象添加属性、方法
		stu.name = "李四";
		stu.sex = "女";
		stu.age = 16;
		stu.eat = function() {
			console.log("吃，吃，吃....")
		}
		// 使用对象的属性、方法
		stu.eat();
		console.log("姓名：" + stu.name)
	</script>
</body>
</html>